/**
 * @Date: 2022-03-07 13:06:21
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-03-09 16:00:50
 * @FilePath: \zhihuReal\routes\home.js
 * @Description: something
 */
// @ts-nocheck
const router = require('koa-router')()
const {
  upload
} = require('../controllers/homeCtl')
router.get('/', async (ctx, next) => {
  await ctx.render('index', {
    title: 'Hello Koa 2!'
  })
})
router.post('/upload', async (ctx, next) => {
  const file = await upload(ctx)
  ctx.body = file
})

module.exports = router